package cn.lhf.cd.controller;

import cn.lhf.cd.annotation.FXController;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;

import java.math.BigDecimal;

@FXController(path = "/ui/goods_info_dialog.fxml")
public class GoodsInfoDialogController {
    public TextField nameField;
    public TextField priceField;
    public TextField typeField;
    public TextArea detailField;

    public String getName() {
        return nameField.getText();
    }

    public String getPrice() {
        return priceField.getText();
    }

    public String getType() {
        return typeField.getText();
    }

    public String getDetail() {
        return detailField.getText();
    }

    public void setName(String name) {
        nameField.setText(name);
    }

    public void setPrice(BigDecimal price) {
        priceField.setText(price.toString());
    }

    public void setType(String type) {
        typeField.setText(type);
    }

    public void setDetail(String detail) {
        detailField.setText(detail);
    }
}
